package Cain.initEffect 
{	
	import flash.display.BlendMode;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	/**
	 * 說明文框
	 * @author cain in liontravel 2010
	 */
	public class ReadMe extends InitEffect
	{	
		private var text:TextField;
		private var ty:TextFormat;
		private var str:String;
		public function ReadMe(_str:String = "說明文字",_tf:TextFormat = null) 
		{
			str = _str;
			if (_tf==null) 
			{
				_tf = new TextFormat();
				_tf.align = "left";
				_tf.color = 0x280000;
				_tf.kerning = .2;
				_tf.size = 12;
				_tf.indent = 2;
			}
			ty = _tf;
			setup();
			super();
		}	
		
		private function setup():void
		{
			blendMode = BlendMode.LAYER;
			text = new TextField();
			text.defaultTextFormat = ty;
			text.autoSize = TextFieldAutoSize.LEFT;
			text.background = true;
			text.backgroundColor = 0xFFFFCD;
			text.border = true;
			text.borderColor = 0;
			text.multiline = true;
			text.text = str;
			text.selectable = false;
			x = 5;
			y = 5;
			addChild(text);
		}
	}

}